home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Information / THINK C Digest / 1991 / 91-12 < prev   
Text File  |  1995-12-31  |  63KB  |  1,691 lines

  1. 
  2. Path: ucivax!gateway
  3. From: udsugar@king.mcs.drexel.edu (David Sugar)
  4. Subject: INIT???
  5. Message-ID: <9112020100.AA11372@mcs.drexel.edu>
  6. Newsgroups: fa.think-c
  7. Lines: 10
  8. Date: 2 Dec 91 01:03:51 GMT
  9.  
  10.  
  11.   I'm planning on doing some work on an INIT and have no idea what if any
  12. special things I need to do to write an INIT.  Does anyone know where I
  13. can get some soure for an INIT, all I need is something basic.  Although
  14. I do need something that will stay running in the background and not
  15. something that will just do something once and quit.  You know what I
  16. mean??  Any suggestions??
  17.  
  18. Dave sugar
  19. udsugar@mcs.drexel.edu
  20. 
  21. 
  22. Path: ucivax!gateway
  23. From: rrk@iris3.chem.fsu.edu ("Randal R. Ketchem")
  24. Subject: 4.0.5 -> 5.0.1
  25. Message-ID: <9112020513.AA16072@iris3.chem.fsu.edu>
  26. Newsgroups: fa.think-c
  27. Lines: 18
  28. Date: 2 Dec 91 05:13:22 GMT
  29.  
  30.  
  31. ThinkC users:
  32.  
  33. I have ThinkC 4.0.5, which works fine for me. What does 5.0.1 do that 4.0.5
  34. does not do?
  35.  
  36. Thanks,
  37. Randy
  38.  
  39. +------------------------------------------------------------------------+
  40. | Randal R. Ketchem                     Internet: rrk@iris3.chem.fsu.edu |
  41. | Institute of Molecular Biophysics               rrk@ws.chem.fsu.edu    |
  42. | Florida State University                        rrk@iris1.sb.fsu.edu   |
  43. | Tallahassee, FL 32306-3006            BitNet:   rrk@fsu.bitnet         |
  44. | 904.644.7798                                                           |
  45. +------------------------------------------------------------------------+
  46.  
  47.  
  48. 
  49. 
  50. Path: ucivax!gateway
  51. From: degennar%bmsr3.usc.edu@usc.edu (Raymond Degennaro)
  52. Subject: Overloading and multiple inheritance
  53. Message-ID: <9112020635.AA02092@bmsr3.usc.edu>
  54. Newsgroups: fa.think-c
  55. Lines: 9
  56. Date: 2 Dec 91 06:35:58 GMT
  57.  
  58.  
  59. I'm concidering getting THINK C; how well does it handle overloading operators
  60. and multiple inheritance?  These are two features I really need for the project
  61. I'm about to start.  Thankx.
  62.  
  63.  
  64. Ray (DJ) DeGennaro II
  65. degennar@bmsrs.usc.edu
  66.  
  67. 
  68. 
  69. Path: ucivax!gateway
  70. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  71. Subject: Overloading and multiple inheritance
  72. Message-ID: <9112021404.AA29215@chaos.cs.brandeis.edu>
  73. In-Reply-To: Raymond Degennaro's message of 2 Dec 91 06:35:58 GMT <9112020635.AA02092@bmsr3.usc.edu>
  74. Newsgroups: fa.think-c
  75. Lines: 15
  76. Date: 2 Dec 91 14:04:25 GMT
  77.  
  78. From: Raymond Degennaro <degennar%bmsr3.usc.edu@usc.edu>
  79.  
  80.    I'm concidering getting THINK C; how well does it handle
  81.    overloading operators and multiple inheritance?
  82.  
  83. THINK C 4.0 and 5.0 do not support multiple inheritance, and they
  84. don't support operator overloading. They support a single inheritance
  85. object model, with polymorphism. C 5.0 provides access control and
  86. some other niceties; it's still a long way from "true" C++.
  87.  
  88.     -phil
  89. ----
  90.    Phil Shapiro                           Technical Support Analyst
  91.    Language Products Group                     Symantec Corporation
  92.         Internet: phils@chaos.cs.brandeis.edu
  93. 
  94. 
  95. Path: ucivax!gateway
  96. From: wirehead@oxy.edu ("David J. Harr")
  97. Subject: How to get 4+ to work with Sys 7 & TC 5.0.1
  98. Message-ID: <197540@tiger.oxy.edu>
  99. Newsgroups: fa.think-c
  100. Lines: 24
  101. Date: 2 Dec 91 17:43:14 GMT
  102.  
  103. OK, the general consensus seems to be that the author of 4+ has pulled a
  104. fast fade, or at least has dropped from sight. I tried again to get it to
  105. work with System 7.0.1 and Think C 5.0.1, and finally came up with a method
  106. that gets it to load, although I make no promises on whether all the
  107. functions are available. This is basically a two step process.
  108.  
  109. 1. Open your System Folder and put 4+ into the first level of the System
  110.    Folder. In other words, don't just drop the file onto the System Folder,
  111.    because then the System will put it in the Extensions folder. Apparently,
  112.    since 4+ was written before System 7, when Think C starts up and 4+ looks
  113.    for its disk file to load all of the resources into the Think C heap, it
  114.    only looks in the System Folder itself, because it doesn't know about the
  115.    Extensions folder.
  116. 2. Open 4+ with ResEdit and change 'STR#' 129 to "THINK C 5.0" or whatever
  117.    the name of your compiler is. 4+ uses STR# 129 to decide which program
  118.    to load itself into.
  119.  
  120. If you perform both of these actions, you will once again be rewarded with
  121. the 4+ menu in your Think C 5 environment, but I make no promises as to how
  122. many of the functions continue to work. (personally, I mainly use it to put
  123. windows at different places on the screen, so I don't use the advanced stuff
  124. a whole lot).
  125.  
  126. David
  127. 
  128. 
  129. Path: ucivax!gateway
  130. From: degennar%bmsr3.usc.edu@usc.edu (Raymond Degennaro)
  131. Subject: Overloading operators
  132. Message-ID: <9112020633.AA02090@bmsr3.usc.edu>
  133. Newsgroups: fa.think-c
  134. Lines: 8
  135. Date: 2 Dec 91 17:59:38 GMT
  136.  
  137.  
  138. I'm concidering getting THINK C; how well does it handle overloading operators
  139. and multiple inheritance?  These are two features I really need for the project
  140. I'm about to start.  Thankx.
  141.  
  142.  
  143. Ray (DJ) DeGennaro II
  144. degennar@bmsrs.usc.edu
  145. 
  146. 
  147. Path: ucivax!gateway
  148. From: resnick@cogsci.uiuc.edu (Pete Resnick)
  149. Subject: Re: INIT???
  150. Message-ID: <199112021759.AA25516@tarski.cogsci.uiuc.edu>
  151. X-Mailer: Eudora [version 1.2.2 CTB]
  152. Newsgroups: fa.think-c
  153. Lines: 58
  154. Date: 2 Dec 91 18:00:31 GMT
  155.  
  156. There are basically four choices for writing a little piece of code that
  157. will sit in the background and do something occasionally:
  158.  
  159. 1. Write a VBL or Time Manager Task. Each of these involve writing a code
  160. resource, using the Code Resource option in your THINK C project for the
  161. task itself, and a code resource for the INIT. The INIT will load the task
  162. into the system heap and lock it (either by setting the System Heap and
  163. Locked bits in the resource information or by doing a NewPtrSys for the
  164. size of the code resource and copying it to the allocated memory) and then
  165. install it using the Vertical Retrace Manager or the Time Manager. This is
  166. nice for really small tasks which need to be repeated fairly frequently,
  167. and the Time Manager is nice if the action needs to be repeated at very
  168. exact intervals. The disadvantage to using this is that the VBL or Time
  169. Manager task executes at interrupt time, meaning that you cannot do
  170. anything fancy like allocate memory or do anything that might move memory
  171. in the task. A very limited use mechanism.
  172.  
  173. 2. Patches. My least favorite method. Basically, you load a routine into
  174. the system heap locked, get the address of a trap using NGetTrapAddress,
  175. make the last instruction of your routine 'JMP oldTrapAddress', and call
  176. NSetTrapAddress with the address of your routine. A variation on this is to
  177. install a JGNEFilter, which is a small routine that is called by
  178. WaitNextEvent. Again, you get the current address of JGNEFilter (in a low
  179. memory global), make your last instruction a JMP to that routine, and put
  180. your address into the global. None of this is pretty, and you depend on the
  181. trap being called to get your routine to run. Ugly, ugly, ugly.
  182.  
  183. 3. Write a THINK C device driver. You install the device driver in the
  184. system heap also, and can set the dNeedTime flag to have it called as often
  185. as you like down to every 1/60th of a second. Device drivers can allocate
  186. as much memory as they and do all sorts of nasty and nifty things (work
  187. with files, etc.). They are somewhat tricky to write and install at INIT
  188. time, though I am working on some sample code to do this (which I will post
  189. as soon as it's done). A really nice mechanism for system heap junkies, and
  190. fun for the whole family.
  191.  
  192. 4. Write a faceless background application. Clearly the best choice, and a
  193. cinch under System 7. Under System 7, just write an application that
  194. doesn't do any window or QuickDraw stuff, make it's file type 'appe', stick
  195. it in your Extensions folder, and you're done! Under System 6, you have to
  196. write a pretty sneaky INIT that will launch the application for you after
  197. INIT time is over (I have some unfinished sample code for that), and it
  198. will only run under MultiFinder. If you need it to run under uni-Finder,
  199. use one of the above plans.
  200.  
  201. I am partial to faceless background applications if you have MultiFinder,
  202. device drivers if you need to do anything fancy, and Time Manager or VBL
  203. tasks if it is something *really* small and can all be done without moving
  204. memory. I hate patches and would avoid them at all costs.
  205.  
  206. pr
  207. --
  208. Pete Resnick        (...so what is a mojo, and why would one be rising?)
  209. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  210. System manager - Cognitive Science Group, Beckman Institute, UIUC
  211. Internet/ARPAnet/EDUnet  : resnick@cogsci.uiuc.edu
  212. BITNET (if no other way) : FREE0285@UIUCVMD
  213.  
  214. 
  215. 
  216. Path: ucivax!gateway
  217. From: hao@slipknot.mit.edu (Cindy Hao)
  218. Subject: please take my name off the think-c mailing list.
  219. Message-ID: <9112030229.AA14361@slipknot.mit.edu>
  220. Newsgroups: fa.think-c
  221. Lines: 10
  222. Date: 3 Dec 91 02:29:46 GMT
  223.  
  224.  
  225. The subject title says it all.
  226.  
  227. Thanks.
  228. ------------------------------------------------------------------
  229. Cindy Hao            email:hao@slipknot.mit.edu
  230. NW14-2524            tel:  (617)253-7458
  231. 150 Albany Street
  232. Cambridge, MA 02139
  233.  
  234. 
  235. 
  236. Path: ucivax!gateway
  237. From: JSC93@uno.cc.geneseo.edu (JON)
  238. Subject: please take my name off the think-c mailing list        -Thanx
  239. Message-ID: <01GDO8C7WZU80008F4@geneseo.bitnet>
  240. Newsgroups: fa.think-c
  241. X-VMS-To: IN%"think-c@ics.uci.edu"
  242. Lines: 0
  243. Date: 3 Dec 91 15:14:01 GMT
  244.  
  245. 
  246. 
  247. Path: ucivax!gateway
  248. From: blaise@dbmac.gna.tfd.com (Blaise THAUVIN)
  249. Subject: Problemes ?
  250. Message-ID: <9112031458.AA02508@afp.tfd.com>
  251. Newsgroups: fa.think-c
  252. Reply-To: Blaise THAUVIN <blaise@dbmac.gna.tfd.com>
  253. Organization: Individual
  254. Lines: 15
  255. Date: 3 Dec 91 15:21:13 GMT
  256.  
  257. Bonjour,
  258.  
  259. Y a t il en ce moment des problemes de communication en GNA et l'exterieur, ou des quotas depasses? J'ai envoye plusieurs courriers dont les reponses auraient du revenir des le lendemain et je n'ai rien plusieurs jours apres.
  260.  
  261. Je me suis inscrit sur une liste (think-c@ics.uci.edu) il y a plus d'une semaine, j'ai recu une reponse du moderateur me disant que j'etais inscrit et rien depuis (rythme normal: 5 a 10 messages/jour).
  262.  
  263. Les news sont tres irreguliers (comp.sys.mac...) sauf resif. Un jour j'ai eu plus de 200 messages puis quasiment rien depuis. Le ryhme normal est bien plus proche des 200 que de 0 (40 a 50/jour pour l'ensemble de la hierarchie comp.sys.mac...)
  264.  
  265. Est-ce normal, inquietant, inexplicable...?
  266.  
  267. Derniere question: Quelles sont les heures des levees! ie: Quand faut-il appeller au plus tard pour expedier. Quand appeller au plus tot pour recuperer les reponses. A moins que le lien soit permanent ?
  268.  
  269. Blaise
  270.  
  271.  
  272. 
  273. 
  274. Path: ucivax!gateway
  275. From: wirehead@oxy.edu (David Harr)
  276. Subject: Where to get 4+
  277. Message-ID: <9112031647.AA21329@bobcat.oxy.edu>
  278. Newsgroups: fa.think-c
  279. Lines: 5
  280. Date: 3 Dec 91 16:47:12 GMT
  281.  
  282. People have sent me messages asking where to get 4+, which is as enhancer for the Think C editor. You can find it at ics.uci.edu, in the directory
  283. /mac/think-c/compiler. I'm pretty sure that's where it is, anyway. If you poke
  284. around in the ftp site, I'm sure you'll find it.
  285.  
  286. David
  287. 
  288. 
  289. Path: ucivax!gateway
  290. From: sidar@complex.is (Sigurdur Darri Skulason)
  291. Subject: drvr /init
  292. Message-ID: <9112041439.AA01629@complex.is>
  293. X-Mailer: ELM [version 2.3 PL11]
  294. Newsgroups: fa.think-c
  295. X-Charset: ASCII
  296. Lines: 23
  297. Date: 4 Dec 91 14:41:34 GMT
  298. X-Char-Esc: 29
  299.  
  300.  
  301. - Device drivers can allocate
  302. - as much memory as they and do all sorts of nasty and nifty things (work
  303. -  with files, etc.). They are somewhat tricky to write and install at INIT
  304. - time, though I am working on some sample code to do this (which I will post
  305. - as soon as it's done). A really nice mechanism for system heap junkies, and
  306. - fun for the whole family.
  307.  
  308. I am currently writing a program which is a merger of a Init/drvr with
  309. a lot of dirty work, so i needed a code to load a driver into the system
  310. heap at init time. Searching through the ftp sites, I found somewhere
  311. (sumex /umich /apple ?) a sample think-c source, which I belive was called
  312. drvr-install.sit or something that obvious. It is really very nice and
  313. works perfectly both with sys 6 & 7, and supports lsc use of
  314. data and multiple code segments.
  315.  
  316. It may be to late now for you to look at this, since you may already have
  317. reinvented and redesigned the wheel, but in case somebody else needs it,
  318. try looking at the ftp sites. Also, I can mail it to anyone interested.
  319.  
  320.  
  321. - Sigurdur Darri Skulason                         sidar@complex.is
  322.   Hugsun inc.
  323. 
  324. 
  325. Path: ucivax!gateway
  326. From: resnick@cogsci.uiuc.edu (Pete Resnick)
  327. Subject: Re: drvr /init
  328. Message-ID: <199112041731.AA27142@tarski.cogsci.uiuc.edu>
  329. X-Mailer: Eudora [version 1.2.2 CTB]
  330. Newsgroups: fa.think-c
  331. Lines: 17
  332. Date: 4 Dec 91 17:32:10 GMT
  333.  
  334. >Searching through the ftp sites, I found somewhere
  335. >(sumex /umich /apple ?) a sample think-c source, which I belive was called
  336. >drvr-install.sit or something that obvious.
  337.  
  338. I am the culprit who write that little piece of code. Unfortunately, there
  339. are some *major* bugs in the way it works. I am completing a new version of
  340. the driver installation code. As soon as it is done, I will post it
  341. everywhere.
  342.  
  343. pr
  344. --
  345. Pete Resnick        (...so what is a mojo, and why would one be rising?)
  346. Graduate assistant - Philosophy Department, Gregory Hall, UIUC
  347. System manager - Cognitive Science Group, Beckman Institute, UIUC
  348. Internet/ARPAnet/EDUnet  : resnick@cogsci.uiuc.edu
  349. BITNET (if no other way) : FREE0285@UIUCVMD
  350.  
  351. 
  352. 
  353. Path: ucivax!gateway
  354. From: johnsone@uxh.cso.uiuc.edu ("Erik A. Johnson")
  355. Subject: ResEdit 2.1.x extensions examples, THINK C port
  356. Message-ID: <199112050640.AA04684@uxh.cso.uiuc.edu>
  357. Newsgroups: fa.think-c
  358. Lines: 77
  359. Date: 5 Dec 91 06:40:48 GMT
  360.  
  361. Hi all,
  362.  
  363. Several months ago, a number of people expressed interest in a THINK C
  364. port of the ResEdit Extensions Examples from Apple.  These routines were
  365. originally coded in MPW C.  Well, at the time I said I'd post a port to
  366. THINK C that I did (with much help from Phil Shapiro at Symantec).  After
  367. a delay in order to get the necessary permissions to redistribute Apple-
  368. copyrighted software, and a big delay due to a busy semester, I'm finally
  369. getting around to posting this.
  370.  
  371. Due to its length, I won't post it directly to the THINK C mailing list,
  372. but I'm sending it to the THINK C archive on ics.uci.edu (128.195.1.1)
  373. and the info-mac archives on sumex-aim.stanfor.edu.
  374.  
  375. I'll tack part of the "ReadMe" file on after my .sig.  Hope you find this
  376. helpful.  God bless you.
  377.  
  378.  
  379. Erik A. Johnson        \    Internet: johnsone@uxh.cso.uiuc.edu     \       |
  380. ------------------------\    AmericaOnline: ErikAJ                   \    --+--
  381. Graduate Student         \--------------------------------------------\     |
  382. Aero/Astro Engineering    \  "Jesus said to him, 'I am the way, and    \    |
  383. University of Illinois at  \  the truth, and the life; no one comes to  \   |
  384.    Urbana-Champaign (UIUC)  \  the Father except through me.'" (Jn14:6)  \
  385.  
  386.  
  387. --------------------------------- cut here -----------------------------
  388.  
  389.  
  390. ResEdit 2.1x extensions in THINK C 5.0                            12/05/91
  391.  
  392.  
  393. Here is my attempt at porting the ResEdit extensions from MPW 3.2 C to
  394. THINK C 5.0.1 (as far as I know, this should still work with any 4.0.x
  395. version -- I was using 4.0.5 and it works with that -- to convert from 5.0.x
  396. to 4.0.x, create a new project file).
  397.  
  398. Big thanks to Phil Shapiro at Symantec for helping me out quite a bit on
  399. this and to Mark Johnson at MacDTS for getting me in touch with the ResEdit
  400. product manager.
  401.  
  402. Note that parts of this code are "Copyright Apple Computer, Inc. 1985-1990.
  403. All rights reserved." (as was included in some of the MPW C source files from
  404. Apple).  (My modifications are public domain, so use them as you see fit.)
  405.  
  406. I have gotten permission from Apple's ResEdit product manager, from Phil
  407. Shapiro at Symantec, and from Maarten Meijer (who did some of the first
  408. modifications for THINK C 4.0) to distribute this copyrighted code.
  409.  
  410. Because of the Apple copyright, please do not redistribute modified versions
  411. of these files without contacting either me (see e-mail address below) or
  412. contacting MacDTS for permission.  But you are free to use this code to
  413. produce your own ResEdit extensions and to distribute those code extensions.
  414.  
  415.  
  416. Read the file "ReadMe from Erik A. Johnson" for further instructions from
  417. me.  Read the file "Instructions (from Apple)" for the instructions from
  418. Apple.  And the file "ResEd Routines index (from EAJ)" is an index of the
  419. routines mentioned in the ResEdit Reference, giving the page and section in
  420. which the routine can be found in the Reference and giving the function's
  421. prototype.
  422.  
  423. If you have any questions, bug reports, etc., send me e-mail.  Also, if you
  424. write any useful ResEdit extensions, let me know -- I'd love to see them.
  425.  
  426. God bless you!
  427.  
  428.  
  429. Erik A. Johnson        \    Internet: johnsone@uxh.cso.uiuc.edu     \       |
  430. ------------------------\    AmericaOnline: ErikAJ                   \    --+--
  431. Graduate Student         \--------------------------------------------\     |
  432. Aero/Astro Engineering    \  "Jesus said to him, 'I am the way, and    \    |
  433. University of Illinois at  \  the truth, and the life; no one comes to  \   |
  434.    Urbana-Champaign (UIUC)  \  the Father except through me.'" (Jn14:6)  \
  435.  
  436. -----------------------------------------------------------------------------
  437.  
  438. 
  439. 
  440. Path: ucivax!gateway
  441. From: blaise@dbmac.gna.tfd.com (Blaise THAUVIN)
  442. Subject: (none)
  443. Message-ID: <9112050558.AA00740@afp.tfd.com>
  444. Newsgroups: fa.think-c
  445. Reply-To: Blaise THAUVIN <blaise@dbmac.gna.tfd.com>
  446. Organization: Individual
  447. Lines: 7
  448. Date: 5 Dec 91 14:26:36 GMT
  449.  
  450. I apology to all of you who received my posting in French
  451. I am afraid this was a misrouted message due to a fault in my alias file. It was originaly intended to my system administrator in France (He speaks French better than English).
  452.  
  453. Sorry for the trouble
  454.  
  455. Blaise
  456.  
  457. 
  458. 
  459. Path: ucivax!gateway
  460. From: cschick@chemistry.umass.edu
  461. Subject: animation
  462. Message-ID: <911205164303954-MTASATURN*cschick@CHEMISTRY.umass.edu>
  463. P1-Message-ID: US*UMASSMAIL*UMASS; 911205164303954-MTASATURN
  464. X400-Trace: US*UMASSMAIL*UMASS; arrival Thu, 5 Dec 91 16:46:17 -0500 action
  465.  Relayed
  466. Newsgroups: fa.think-c
  467. UA-Content-ID: 911205164303954-
  468. Lines: 7
  469. Date: 5 Dec 91 21:54:17 GMT
  470.  
  471. Hello,
  472. Is there anyone out there who does animation on the Macs using ThinkC? Of you
  473. that do, I'd like to learn some tricks and techniques. COuld you send any
  474. pointers if possible. Any reply is welcome.
  475. Thank you,
  476. Charlie Schick
  477. cschick@chemistry.umass.edu
  478. 
  479. 
  480. Path: ucivax!gateway
  481. From: nagel@ics.uci.edu (Mark Nagel)
  482. Subject: ARCHIVE: ResEdit Extensions ported to THINK C
  483. Message-ID: <8470.691983573@ics.uci.edu>
  484. Newsgroups: fa.think-c
  485. Reply-To: nagel@ics.uci.edu
  486. Lines: 47
  487. Date: 6 Dec 91 01:39:40 GMT
  488.  
  489. ResEdit 2.1x extensions in THINK C 5.0                            12/05/91
  490.  
  491.  
  492. Here is my attempt at porting the ResEdit extensions from MPW 3.2 C to
  493. THINK C 5.0.1 (as far as I know, this should still work with any 4.0.x
  494. version -- I was using 4.0.5 and it works with that -- to convert from 5.0.x
  495. to 4.0.x, create a new project file).
  496.  
  497. Big thanks to Phil Shapiro at Symantec for helping me out quite a bit on
  498. this and to Mark Johnson at MacDTS for getting me in touch with the ResEdit
  499. product manager.
  500.  
  501. Note that parts of this code are "Copyright Apple Computer, Inc. 1985-1990.
  502. All rights reserved." (as was included in some of the MPW C source files from
  503. Apple).  (My modifications are public domain, so use them as you see fit.)
  504.  
  505. I have gotten permission from Apple's ResEdit product manager, from Phil
  506. Shapiro at Symantec, and from Maarten Meijer (who did some of the first
  507. modifications for THINK C 4.0) to distribute this copyrighted code.
  508.  
  509. Because of the Apple copyright, please do not redistribute modified versions
  510. of these files without contacting either me (see e-mail address below) or
  511. contacting MacDTS for permission.  But you are free to use this code to
  512. produce your own ResEdit extensions and to distribute those code extensions.
  513.  
  514.  
  515. Read the file "ReadMe from Erik A. Johnson" for further instructions from
  516. me.  Read the file "Instructions (from Apple)" for the instructions from
  517. Apple.  And the file "ResEd Routines index (from EAJ)" is an index of the
  518. routines mentioned in the ResEdit Reference, giving the page and section in
  519. which the routine can be found in the Reference and giving the function's
  520. prototype.
  521.  
  522. If you have any questions, bug reports, etc., send me e-mail.  Also, if you
  523. write any useful ResEdit extensions, let me know -- I'd love to see them.
  524.  
  525. God bless you!
  526.  
  527.  
  528. Erik A. Johnson        \    Internet: johnsone@uxh.cso.uiuc.edu     \       |
  529. ------------------------\    AmericaOnline: ErikAJ                   \    --+--
  530. Graduate Student         \--------------------------------------------\     |
  531. Aero/Astro Engineering    \  "Jesus said to him, 'I am the way, and    \    |
  532. University of Illinois at  \  the truth, and the life; no one comes to  \   |
  533.    Urbana-Champaign (UIUC)  \  the Father except through me.'" (Jn14:6)  \
  534.  
  535. [saved as: /mac/think-c/code/resedit-extension-think-c-port.hqx; 67K]
  536. 
  537. 
  538. Path: ucivax!gateway
  539. From: udsugar@king.mcs.drexel.edu (David Sugar)
  540. Subject: PPC ToolBox???
  541. Message-ID: <9112060414.AA12052@mcs.drexel.edu>
  542. Newsgroups: fa.think-c
  543. Lines: 44
  544. Date: 6 Dec 91 05:25:32 GMT
  545.  
  546.  
  547.   Ok I started doing some work with the PPC Toolbox tonight to get a program
  548. that I am working on to be able to link, and well, it didn't seem to work..
  549. When I called PPCOpen it gave me a Illegal Address Error or and Odd Address
  550. Error after that call..   Umm, I've just set up the start of PPC.  So, I'll
  551. post the bit of code that I have written and maybe someone can figure out
  552. what I've screwed up, but I would also like to see some code written in
  553. Think-C that uses the PPCToolBox.  I have some from Apple that PPC Phone and
  554. PhoneMe, or something like that, but I have a tough time looking at code
  555. that is written in MPW C and converting it to Think-C..  (Maybe it's just me).
  556. Oh well, here is what I have done..
  557.  
  558. void StartPPC(void)
  559. {
  560.     OSErr    err;
  561.     Str32    type="\pWhat's Up??";
  562.  
  563.     err=PPCInit();
  564.     PortRecord.nameScript=smRoman;
  565.     strcpy((char *)PortRecord.name,(char *)"\pWhat's Up??");
  566.     PortRecord.portKindSelector=ppcByString;
  567.     strcpy((char *)PortRecord.u.portTypeStr,(char *)"\pToo Cool");
  568.     LocationName.locationKindSelector=ppcNBPTypeLocation;
  569.     strcpy((char *)LocationName.u.nbpType,(char *)"\pWhat's Up PPC");
  570.     PPCOpenRec->serviceType=ppcServiceRealTime;
  571.     PPCOpenRec->resFlag=0;
  572.     PPCOpenRec->portName=&PortRecord;
  573.     PPCOpenRec->locationName=&LocationName;
  574.     PPCOpenRec->networkVisible=TRUE;
  575.     err=PPCOpen(PPCOpenRec,FALSE);
  576. }
  577.  
  578. and like I said, that last function call, PPCOpen give me a wierd error..
  579. Any and all help is always appreciated..
  580.  
  581.  
  582. OH, also, I would like to thank everyone who responded to my last question
  583. about writing INIT's..  I've done some playing with that and have choosen
  584. to use a background-only appe for that.  It does seem like that best and
  585. easiest way of doing what I want to do.  Thanks..
  586.  
  587. Dave Sugar
  588. udsugar@mcs.drexel.edu
  589.  
  590. 
  591. 
  592. Path: ucivax!gateway
  593. From: mead@informatics.wustl.edu (Charles Mead)
  594. Subject: MIDI data from the Mac
  595. Message-ID: <9112081816.AA04282@informatics.WUstl.EDU>
  596. Newsgroups: fa.think-c
  597. Lines: 17
  598. Date: 8 Dec 91 18:18:17 GMT
  599.  
  600.  
  601. I have a friend who is trying to write a MIDI sequencer for a class project
  602. in CS and she came to me with a question about
  603. MIDI data rates and the Mac serial port etc.  Can anyone help her?  Thanks
  604. in advance.  I'll put her on to describe her problem in detail.....
  605.  
  606.   Hi.  For this project I have a Mac classic sending MIDI messages to a
  607. Studio 3 interface, which then sends them on to a sound generator and speaker.
  608. Because it is for a 68000 assembly language course, I'm directly controlling
  609. the Mac's SCC serial port.  My question is:  how do I set up the SCC chip to
  610. communicate with the Studio 3 module?  Setting it to 1 start bit and 1 stop
  611. bit is no problem, but since the SCC can't generate 31.2 kbaud it must
  612. be sending information to the Studio 3 at some other baud rate.   Also, does
  613. the Studio 3 expect to see lines like RTS asserted?  The documentation I have
  614. available on the Studio 3 doesn't cover the details on its serial communication.
  615. Any info you can give will be a big help.  Thanks lots
  616.  
  617. 
  618. 
  619. Path: ucivax!gateway
  620. From: mead@informatics.wustl.edu (Charles Mead)
  621. Subject: MIDI and the Mac
  622. Message-ID: <9112081827.AA04312@informatics.WUstl.EDU>
  623. Newsgroups: fa.think-c
  624. Lines: 20
  625. Date: 8 Dec 91 18:28:39 GMT
  626.  
  627.  
  628.  
  629.  
  630. I have a friend who is trying to write a MIDI sequencer for a class project
  631. in CS and she came to me with a question about
  632. MIDI data rates and the Mac serial port etc.  Can anyone help her?  Thanks
  633. in advance.  I'll put her on to describe her problem in detail.....
  634.  
  635.   Hi.  For this project I have a Mac classic sending MIDI messages to a
  636. Studio 3 interface, which then sends them on to a sound generator and speaker.
  637. Because it is for a 68000 assembly language course, I'm directly controlling
  638. the Mac's SCC serial port.  My question is:  how do I set up the SCC chip to
  639. communicate with the Studio 3 module?  Setting it to 1 start bit and 1 stop
  640. bit is no problem, but since the SCC can't generate 31.2 kbaud it must
  641. be sending information to the Studio 3 at some other baud rate.   Also, does
  642. the Studio 3 expect to see lines like RTS asserted?  The documentation I have
  643. available on the Studio 3 doesn't cover the details on its serial communication.
  644. Any info you can give will be a big help.  Thanks lot."!!!
  645.  
  646. Tonya Bartow/Charlie Mead
  647. 
  648. 
  649. Path: ucivax!gateway
  650. From: infoserv!apple!well!cbm@zardoz.uucp (Chris Muir)
  651. Subject: Re:  MIDI data from the Mac
  652. Message-ID: <9112082038.AA06954@well.sf.ca.us>
  653. Newsgroups: fa.think-c
  654. Lines: 6
  655. Date: 9 Dec 91 07:52:15 GMT
  656.  
  657. You need to set the SCC to be externally clocked from the Studio 3's 1Mhz
  658. external clock. There was source to do this sort of thing in an old MacTutor.
  659. __________________________________________________________________________
  660. Chris Muir                              |   "There is no language in our
  661. cbm@well.sf.ca.us                       |    lungs to tell the world just
  662. {hplabs,pacbell,ucbvax,apple}!well!cbm  |    how we feel"  - A. Partridge
  663. 
  664. 
  665. Path: ucivax!gateway
  666. From: Mark.Alldritt@vancouver.osiware.bc.ca (Mark Alldritt)
  667. Subject: MDEF questions
  668. Message-ID: <9112101578*Mark.Alldritt@Vancouver.osiware.bc.ca>
  669. Newsgroups: fa.think-c
  670. Lines: 10
  671. Date: 10 Dec 91 17:44:26 GMT
  672.  
  673. Hello,
  674.  
  675. I'm writting a MDEF using the Think Class Library's CSelectorMDEF class.  My
  676. custome MDEF is used in conjuntion  with the System 7 popup-menu CDEF.  When
  677. I examine the message numbers passed to the MDEF i'm seeing some messages that
  678. don't seem to be documented.  Specifically, message numbers 4 and 5.  Does
  679. anyone know what these message numbers mean?
  680.  
  681. Thanks in advance
  682. -Mark
  683. 
  684. 
  685. Path: ucivax!gateway
  686. From: dave@ccs.itd.umich.edu
  687. Subject: Re: MDEF questions
  688. Message-ID: <9112101903.AA26145@ccs.itd.umich.edu>
  689. In-Reply-To: Your message of "10 Dec 91 17:44:26 GMT."
  690.              <9112101578*Mark.Alldritt@Vancouver.osiware.bc.ca>
  691. Newsgroups: fa.think-c
  692. Lines: 23
  693. Date: 10 Dec 91 19:04:22 GMT
  694.  
  695. > From:    Mark Alldritt <Mark.Alldritt@vancouver.osiware.bc.ca>
  696. > To:      think-c@ics.uci.edu
  697. >
  698. >I'm writting a MDEF using the Think Class Library's CSelectorMDEF class.  My
  699. >custome MDEF is used in conjuntion  with the System 7 popup-menu CDEF.  When
  700. >I examine the message numbers passed to the MDEF i'm seeing some messages that
  701. >don't seem to be documented.  Specifically, message numbers 4 and 5.  Does
  702. >anyone know what these message numbers mean?
  703.  
  704. From Menus.h:
  705.     mDrawItemMsg = 4,
  706.     mCalcItemMsg = 5,
  707. These messages are used by Apple's popup CDEF to draw just the current
  708. item, and also to figure out how long it is.
  709.  
  710. I lined DTS about these message, and they wouldn't document them for
  711. me.  If you MDEF isn't used by the popup CDEF, then you don't need to
  712. worry about them. Otherwise you can either figure them out, and risk
  713. Apple changing the way they work, or write you own popup CDEF...
  714.  
  715. Dave Koziol                           | Internet:   Dave.Koziol@umich.edu
  716. Macintosh Software Engineer           | AOL:        Dave.Koziol
  717. DPK Software                          | AppleLink:  Koziol
  718. 
  719. 
  720. Path: ucivax!gateway
  721. From: yarri@ee.eng.ohio-state.edu (Douglas Yarrington)
  722. Subject: How to call CODE resources?
  723. Message-ID: <9112110342.AA01394@tigris>
  724. X-Mailer: ELM [version 2.3 PL0]
  725. Newsgroups: fa.think-c
  726. Lines: 33
  727. Date: 11 Dec 91 03:42:18 GMT
  728.  
  729. Hi.
  730.  
  731. I've been struggling with finding the right (ie, easiest) way to
  732. create a CODE resource, and then call it as an external function.
  733.  
  734. I have a simple CODE res, with one main function:
  735.  
  736.     int main(int a)
  737.     {
  738.         return(a+2);
  739.     }
  740.  
  741. I create the resource via the "Set Project Type..." menu, selecting
  742. "Code Resource," then select "Custom Header" (or do I?)
  743.  
  744. Then, in another project, if I make a declaration of:
  745.  
  746.      extern int MainCode(int a);
  747.  
  748. What do I have to do to be able to call this external fuction by the
  749. following:
  750.  
  751.     b = MainCode(2);
  752.  
  753. Do you know; do you know; do you know?
  754.  
  755. Thanks.
  756.  
  757. --douglas
  758.  
  759.  
  760. _______________________________________________________________________________
  761.  Douglas Yarrington                                 yarri@ee.eng.ohio-state.edu
  762. 
  763. 
  764. Path: ucivax!gateway
  765. From: root@pollux.lu.se (System PRIVILEGED Account)
  766. Subject: This mail got stuck here - sorry!
  767. Message-ID: <9112111601.AA07587@Pollux.lu.se>
  768. Newsgroups: fa.think-c
  769. Lines: 31
  770. Date: 11 Dec 91 16:01:49 GMT
  771.  
  772. From fa.think-c-outbound-request@ics.uci.edu Sun Dec  8 21:13:02 1991
  773. Received: from [128.195.1.1] by Pollux.lu.se with SMTP
  774.     (5.61-bind 1.4+ida/IDA-1.2.8) id AA04222; Sun, 8 Dec 91 21:13:02 +0100
  775. Received: from ics.uci.edu by ics.uci.edu id aa03088; 8 Dec 91 10:22 PST
  776. Received: from USENET by ics.uci.edu id aa03065; 8 Dec 91 10:18 PST
  777. From: Charles Mead <mead@informatics.wustl.edu>
  778. Subject: MIDI data from the Mac
  779. Message-Id: <9112081816.AA04282@informatics.WUstl.EDU>
  780. Newsgroups: fa.think-c
  781. Date: 8 Dec 91 18:18:17 GMT
  782. To: think-c@ics.uci.edu
  783. Status: RO
  784.  
  785.  
  786. I have a friend who is trying to write a MIDI sequencer for a class project
  787. in CS and she came to me with a question about
  788. MIDI data rates and the Mac serial port etc.  Can anyone help her?  Thanks
  789. in advance.  I'll put her on to describe her problem in detail.....
  790.  
  791.   Hi.  For this project I have a Mac classic sending MIDI messages to a
  792. Studio 3 interface, which then sends them on to a sound generator and speaker.
  793. Because it is for a 68000 assembly language course, I'm directly controlling
  794. the Mac's SCC serial port.  My question is:  how do I set up the SCC chip to
  795. communicate with the Studio 3 module?  Setting it to 1 start bit and 1 stop
  796. bit is no problem, but since the SCC can't generate 31.2 kbaud it must
  797. be sending information to the Studio 3 at some other baud rate.   Also, does
  798. the Studio 3 expect to see lines like RTS asserted?  The documentation I have
  799. available on the Studio 3 doesn't cover the details on its serial communication.
  800. Any info you can give will be a big help.  Thanks lots
  801.  
  802.  
  803. 
  804. 
  805. Path: ucivax!gateway
  806. From: root@pollux.lu.se (System PRIVILEGED Account)
  807. Subject: delayed mail - sorry!
  808. Message-ID: <9112111945.AA11166@Pollux.lu.se>
  809. Newsgroups: fa.think-c
  810. Lines: 32
  811. Date: 11 Dec 91 19:45:39 GMT
  812.  
  813. From fa.think-c-outbound-request@ics.uci.edu Mon Dec  9 17:15:47 1991
  814. Received: from ics.uci.edu by Pollux.lu.se with SMTP
  815.     (5.61-bind 1.4+ida/IDA-1.2.8) id AA05341; Mon, 9 Dec 91 17:15:47 +0100
  816. Received: by ics.uci.edu id aa07250; 8 Dec 91 11:53 PST
  817. Received: from ics.uci.edu by ics.uci.edu id aa03088; 8 Dec 91 10:22 PST
  818. Received: from USENET by ics.uci.edu id aa03065; 8 Dec 91 10:18 PST
  819. From: Charles Mead <mead@informatics.wustl.edu>
  820. Subject: MIDI data from the Mac
  821. Message-Id: <9112081816.AA04282@informatics.WUstl.EDU>
  822. Newsgroups: fa.think-c
  823. Date: 8 Dec 91 18:18:17 GMT
  824. To: think-c@ics.uci.edu
  825. Status: RO
  826.  
  827.  
  828. I have a friend who is trying to write a MIDI sequencer for a class project
  829. in CS and she came to me with a question about
  830. MIDI data rates and the Mac serial port etc.  Can anyone help her?  Thanks
  831. in advance.  I'll put her on to describe her problem in detail.....
  832.  
  833.   Hi.  For this project I have a Mac classic sending MIDI messages to a
  834. Studio 3 interface, which then sends them on to a sound generator and speaker.
  835. Because it is for a 68000 assembly language course, I'm directly controlling
  836. the Mac's SCC serial port.  My question is:  how do I set up the SCC chip to
  837. communicate with the Studio 3 module?  Setting it to 1 start bit and 1 stop
  838. bit is no problem, but since the SCC can't generate 31.2 kbaud it must
  839. be sending information to the Studio 3 at some other baud rate.   Also, does
  840. the Studio 3 expect to see lines like RTS asserted?  The documentation I have
  841. available on the Studio 3 doesn't cover the details on its serial communication.
  842. Any info you can give will be a big help.  Thanks lots
  843.  
  844.  
  845. 
  846. 
  847. Path: ucivax!gateway
  848. From: root@pollux.lu.se (System PRIVILEGED Account)
  849. Subject: delayed mail - sorry!
  850. Message-ID: <9112111945.AA11174@Pollux.lu.se>
  851. Newsgroups: fa.think-c
  852. Lines: 20
  853. Date: 11 Dec 91 19:46:07 GMT
  854.  
  855. From fa.think-c-outbound-request@ics.uci.edu Mon Dec  9 17:16:39 1991
  856. Received: from ics.uci.edu by Pollux.lu.se with SMTP
  857.     (5.61-bind 1.4+ida/IDA-1.2.8) id AA05351; Mon, 9 Dec 91 17:16:39 +0100
  858. Received: from ics.uci.edu by ics.uci.edu id aa14043; 8 Dec 91 23:55 PST
  859. Received: from USENET by ics.uci.edu id aa14026; 8 Dec 91 23:52 PST
  860. From: Chris Muir <cbm@well.UUCP>
  861. Subject: Re:  MIDI data from the Mac
  862. Message-Id: <9112082038.AA06954@well.sf.ca.us>
  863. Newsgroups: fa.think-c
  864. Date: 9 Dec 91 07:52:15 GMT
  865. To: think-c@ics.uci.edu
  866. Status: RO
  867.  
  868. You need to set the SCC to be externally clocked from the Studio 3's 1Mhz
  869. external clock. There was source to do this sort of thing in an old MacTutor.
  870. __________________________________________________________________________
  871. Chris Muir                              |   "There is no language in our
  872. cbm@well.sf.ca.us                       |    lungs to tell the world just
  873. {hplabs,pacbell,ucbvax,apple}!well!cbm  |    how we feel"  - A. Partridge
  874.  
  875. 
  876. 
  877. Path: ucivax!gateway
  878. From: R.Pugmire@massey.ac.nz
  879. Subject: Control of stereo sound output from hypercard
  880. Message-ID: <911212114035.2200006c@pt-cluster.massey.ac.nz>
  881. Newsgroups: fa.think-c
  882. Lines: 11
  883. Date: 11 Dec 91 22:41:06 GMT
  884. X-Vmsmail-To: EMAIL"think-c@ics.uci.edu"
  885.  
  886. Hi,
  887.  
  888. I need to control the stereo output from hypercard. Ie I want to be able to
  889. play sounds on the left or right channel only of stereo equiped macs. Hence
  890. I need to write an xcmd (In thinkC of course) Does anyone have some xcmd
  891. code to generate sound which I could modify to save starting from scratch.
  892. Thanks in anticipation.
  893.                         Ralph Pugmire
  894.                         R.Pugmire@massey.ac.nz
  895.                         Massey University
  896.                         New Zealand
  897. 
  898. 
  899. Path: ucivax!gateway
  900. From: nick@dcs.edinburgh.ac.uk (Nick Rothwell)
  901. Subject: Re: MIDI and the Mac
  902. Message-ID: <9112111248.aa03993@dcs.ed.ac.uk>
  903. Newsgroups: fa.think-c
  904. Lines: 22
  905. Date: 12 Dec 91 10:54:10 GMT
  906.  
  907. >Because it is for a 68000 assembly language course, I'm directly controlling
  908. >the Mac's SCC serial port.
  909.  
  910. Is this a project to (i) do assembly or (ii) do MIDI? If the latter (or
  911. even if the former), USE THE MIDI MANAGEMENT TOOLS!
  912.  
  913. Or else, do it your own way, and end up with a program which bombs on
  914. PowerBooks and Quadras, doesn't coexist with other MIDI applications in
  915. System 7.0, and brings the system down at every opportunity.
  916.  
  917. If you want to play around with the SCC via assembly code as an
  918. intellectual exercise, go ahead, but it's of absolutely no use to anyone;
  919. the whole point of the Mac software environment is that you never need to,
  920. and in fact mustn't, talk to the hardware directly (use MIDI Manager, the
  921. Comms Toolbox, etc. etc.). This is a more important lesson than learning
  922. how to make an SCC jump through hoops.
  923.  
  924. If you want to apply assembly code to something useful, why not use MIDI
  925. Manager and assembly-code the data handlers?
  926.  
  927.         Nick.
  928.  
  929. 
  930. 
  931. Path: ucivax!gateway
  932. From: udsugar@king.mcs.drexel.edu (David Sugar)
  933. Subject: PPC Programming..
  934. Message-ID: <9112130107.AA12051@mcs.drexel.edu>
  935. Newsgroups: fa.think-c
  936. Lines: 19
  937. Date: 13 Dec 91 01:24:53 GMT
  938.  
  939.  
  940.   I asked for some help a little while ago with PPC stuff and got a good
  941. enough answer.  I was doing my usual stupid stuff and not malloc'ing
  942. space for my pointers and stuff like that.  But, I've figured that out and
  943. have gottem the PPC to init and open and close.  But I'm not really sure
  944. what to do next.  I have the inform and browse functions in their correct
  945. places, but I can't really figure them out.  The browse seems to work, but
  946. I'm not really sure.
  947.   Does anyone have some fairly good code that works and I could go through
  948. and figure out what I'm doing work, or what I'm not doing at all??  I have
  949. some source from Apple but it's written in MPW and really isn't that great
  950. of code..
  951.   Any suggestions??
  952.  
  953.  Thanks in advance..
  954.  
  955. Dave Sugar
  956. udsugar@mcs.drexel.edu
  957.  
  958. 
  959. 
  960. Path: ucivax!gateway
  961. From: markets!keith@uunet.uu.net (Keith Farrar)
  962. Subject: Subscription Request and List Status Inquiry
  963. Message-ID: <9112130153.AA28064@grand-central>
  964. X-Mailer: ELM [version 2.3 PL11]
  965. Newsgroups: fa.think-c
  966. Reply-To: markets!markets.amix.com!thinkc-in@uunet.uu.net
  967. Lines: 17
  968. Date: 13 Dec 91 02:23:37 GMT
  969.  
  970.  
  971. Is this list functional? If so, please add the address
  972.     thinkc-in@markets.amix.com
  973. to your subscribers
  974.             Thank You,
  975.                 -kaf
  976.  
  977. ______________________________________________________________________
  978. | Keith Farrar                                                       |
  979. | AMIX Corporation                                                   |
  980. | Palo Alto, CA                 "Apple is like the Chinese Cultural  |
  981. | (415) 856-1234 x217            Revolution conducted by people in   |
  982. |                                      three-piece suits."           |
  983. | DOMAIN:  keith@markets.amix.com               -John Perry Barlow   |
  984. | UUCP: {uunet|sun|xanadu!}markets!keith                             |
  985. ----------------------------------------------------------------------
  986.  
  987. 
  988. 
  989. Path: ucivax!gateway
  990. From: kire@nada.kth.se (Jan-Erik M}ngs)
  991. Subject: TCL 1.1.1, problems with scrollbars in subpanes...
  992. Message-ID: <9112162315.AA12035@nada.kth.se>
  993. Newsgroups: fa.think-c
  994. Lines: 27
  995. Date: 16 Dec 91 23:18:12 GMT
  996.  
  997. There seems to be a problem with panoramas that contains
  998. scrollbars within subpanes. To see the problem, look for example
  999. at NewClassDemo. Change the windowType of DLOG ID 1030 ("String
  1000. demo") to documentProc or zoomDocProc. Run NewClassDemo and
  1001. select "String table demo..." from the Dialogs-menu. The dialog
  1002. will now have scrollbars. Make the dialog smaller so that only a
  1003. part of the vertical scrollbar (for the list) is seen. Now
  1004. scroll the "main" vertical scroll bar and see how the scrollbar
  1005. belonging to the list updates.
  1006.  
  1007. On a monitor running with less colors then 256 you can sometimes
  1008. see that the scrollbar does not update properly while scrolling.
  1009. With colors set to 256 or "millions" the scrollbar belonging to
  1010. the list is drawn on top of the main scrollbar.
  1011.  
  1012. I've verifyed this problem on both an fx and a SE30, vanilla
  1013. system 7.0 and 7.0.1.
  1014.  
  1015. Anyone seen this? Any workarounds? I'd like to have my windows
  1016. set up like this...
  1017.  
  1018. Another thing, any news on the problems with exception handling
  1019. and register allocation? That problem was not fixed in 1.1.1.
  1020.  
  1021. Thanks
  1022.  
  1023.     Kire
  1024. 
  1025. 
  1026. Path: ucivax!gateway
  1027. From: ewright@bach.convex.com ("Edward V. Wright")
  1028. Subject: problems with MemError, GetGDevice
  1029. Message-ID: <9112172012.AA14917@bach.convex.com>
  1030. Newsgroups: fa.think-c
  1031. Lines: 21
  1032. Date: 17 Dec 91 20:13:21 GMT
  1033.  
  1034.  
  1035. This weekend, I decided to port "Skippy White's Famous High-Level
  1036. Offscreen Map Routines" (Apple DTS Sample Code #15) from Pascal to
  1037. Think C. Unfortunately, I ran into a couple problems.
  1038.  
  1039. The first was with two calls to GetGDevice.  According to Inside
  1040. Macintosh, this should return a handle of type GDHandle.  But when
  1041. I assigned the result to a variable of that type, I got an "incompatible
  1042. pointers" message.  I checked the definition of GetGDevice in Quickdraw.h,
  1043. checked spelling and capitalization, and everything appears to be correct.
  1044.  
  1045. The second problem was MemError. This gave me an "undefined symbol" message.
  1046. So, I checked memory.h to see if the definition was in there. Yep, it was.
  1047. I checked spelling and capitalization. It matched. I checked MacHeaders to
  1048. make sure memory.h was included there. It was. So, why did Think C believe
  1049. MemError was an undefined symbol? I wondered if there could be a bug that
  1050. was preventing memory.h from being included. No, because other memory calls
  1051. work just fine, but just to make sure I copied the definition of MemError
  1052. from memory.h into my source file. I still got an "undefined symbol" message.
  1053.  
  1054. Does anyone have any idea what's going on here?
  1055. 
  1056. 
  1057. Path: ucivax!gateway
  1058. From: dedreb@arco.com
  1059. Subject: Layer Manager
  1060. Message-ID: <9112181922.AA15120@Arco.COM>
  1061. Newsgroups: fa.think-c
  1062. Lines: 9
  1063. Date: 18 Dec 91 19:22:40 GMT
  1064.  
  1065. Does anyone out there know if/when documentation for the new Layer Manager
  1066. (if it indeed exists) will be available?
  1067.  
  1068.  ------------------------------------------------------
  1069. |  Richard Beecher         Internet:  dedreb@arco.com  |
  1070. |  ARCO Alaska, Inc.       Voice:     (907) 263-4885   |
  1071. |  Anchorage, Alaska       Fax:       (907) 265-6298   |
  1072.  ------------------------------------------------------
  1073.  
  1074. 
  1075. 
  1076. Path: ucivax!gateway
  1077. From: kire@nada.kth.se (Jan-Erik M}ngs)
  1078. Subject: Re: TCL 1.1.1, problems with scrollbars in subpanes...
  1079. Message-ID: <9112191115.AA13258@nada.kth.se>
  1080. In-Reply-To: Your message of Wed, 18 Dec 91 16:25:00 PST.
  1081.              <m0kuBaG-0004Y3C@rsoft.bc.ca>
  1082. Newsgroups: fa.think-c
  1083. Lines: 31
  1084. Date: 19 Dec 91 11:15:19 GMT
  1085.  
  1086. From a letter I got from Daryl (Daryl_Spitzer@mindlink.bc.ca):
  1087.  
  1088. >I tried to duplicate the problem on my SE/30 and everything seemed to work
  1089. >fine.  Did you find out what was going wrong?
  1090.  
  1091. Well, I haven't had the time to see what goes wrong. It's not a
  1092. problem specific to dialogs (since my own hack has the same
  1093. problem), NewClassDemo was just an easy way to reproduce it.
  1094.  
  1095. As I said, it's not that easy to see the problem on a b&w
  1096. screen, the updates only _somtimes_ look wrong. But if you
  1097. change hStep and vStep in CScrollPane you will definitely see
  1098. the problem also on an SE30. Comment out the line [marked (**)]
  1099. in CDialog::MakePanorama (code-fragment follows):
  1100.     .
  1101.     .
  1102.     if (fHasHScroll || fHasVScroll || fHasSizeBox)
  1103.     {
  1104.         scrollPane = new( CScrollPane);
  1105.         scrollPane->IScrollPane( this, this, 0, 0, 0, 0, sizELASTIC, sizELASTIC,
  1106.                         fHasHScroll, fHasVScroll, fHasSizeBox);
  1107.         scrollPane->FitToEnclFrame( TRUE, TRUE);
  1108. //(**)        scrollPane->SetSteps( kScrollSteps, kScrollSteps);
  1109.         scrollPane->SetID( kDialogScrollPaneID);
  1110.  
  1111. Without this line, hStep and vStep will have their default
  1112. values. Now do the same test and you should see that the
  1113. scroll-bars of the list do not update properly while scrolling
  1114. (in up/down arrows).
  1115.  
  1116.     Kire
  1117. 
  1118. 
  1119. Path: ucivax!gateway
  1120. From: zeke@reed.edu
  1121. Subject: (none)
  1122. Message-ID: <m0kuNYl-0003D5C@reed.edu>
  1123. Newsgroups: fa.think-c
  1124. Lines: 3
  1125. Date: 19 Dec 91 13:13:22 GMT
  1126.  
  1127. unsubscribe zkoch@reed.edu
  1128.  
  1129. thank you
  1130. 
  1131. 
  1132. Path: ucivax!gateway
  1133. From: owen@camex.com (Owen Hartnett)
  1134. Subject: All killers develop a pattern...
  1135. Message-ID: <9112191327.AA12661@relay2.UU.NET>
  1136. Newsgroups: fa.think-c
  1137. Lines: 9
  1138. Date: 19 Dec 91 13:27:25 GMT
  1139.  
  1140.  
  1141. What's the deal on patterns in Think C 5.0.x?  Now I get an error if
  1142. I try to use PenPat(<pattern>), it wants to be cast to a
  1143. ConstPatternParam.  Why would they change this and how come you guys
  1144. haven't made more noise about it?  ...or am I missing a .h file or
  1145. something?
  1146.  
  1147. -Owen
  1148.  
  1149. 
  1150. 
  1151. Path: ucivax!gateway
  1152. From: blake@seagull.math.byu.edu (Blake Fordham)
  1153. Subject: floating windows
  1154. Message-ID: <9112191447.AA11704@seagull.math.byu.edu>
  1155. Newsgroups: fa.think-c
  1156. Lines: 13
  1157. Date: 19 Dec 91 14:48:57 GMT
  1158.  
  1159. Is anybody familiar with the floating windows routines that are currently
  1160. at the ftp sites?  I've been trying to use them to create a floating palette
  1161. for a program of mine, but I'm not having very good luck.  If anyone can help
  1162. me, please answer directly and I'll send the details then.  If anyone else is interested, I'll post my problems and the solutions later.
  1163.  
  1164. As for my problem with offscreen graphics, I've decided to try to work with
  1165. GWorlds (since I recently got IM6) the problem with allocating memory that I
  1166. was having was not because of segment size, It was because I was not casting
  1167. the number of bytes I wanted to a long int.  Thanks to whoever figured that
  1168. one out for me.
  1169.  
  1170. Blake Fordham
  1171. blake@seagull.math.byu.edu
  1172. 
  1173. 
  1174. Path: ucivax!gateway
  1175. From: sidar@complex.is (Sigurdur Darri Skulason)
  1176. Subject: communication toolbox
  1177. Message-ID: <9112191531.AA00529@complex.is>
  1178. X-Mailer: ELM [version 2.3 PL11]
  1179. Newsgroups: fa.think-c
  1180. X-Charset: ASCII
  1181. Lines: 14
  1182. Date: 19 Dec 91 15:36:34 GMT
  1183. X-Char-Esc: 29
  1184.  
  1185.  
  1186.   I've been looking for a communication toolbox MacTCP tool, but
  1187.   failed miserably.
  1188.   Is there anyone of you, who might know of a such a public domain/shareware
  1189.   tool? Either as source code or compiled version.
  1190.   I would be grateful for any information.
  1191.  
  1192.    -sidar.
  1193.  
  1194. ------------------------------------------------------------
  1195. Sigurdur Darri Skulason                   sidar@complex.is
  1196. President, Hugsun inc.
  1197. Tecnhological Park
  1198. Dunhagi 5, IS-107 Reykjavik, Iceland
  1199. 
  1200. 
  1201. Path: ucivax!gateway
  1202. From: yarri@ee.eng.ohio-state.edu (Douglas Yarrington)
  1203. Subject: Code resource summary
  1204. Message-ID: <9112200609.AA03716@rainier.eng.ohio-state.edu.eng.ohio-state.edu>
  1205. X-Mailer: ELM [version 2.3 PL0]
  1206. Newsgroups: fa.think-c
  1207. Lines: 102
  1208. Date: 20 Dec 91 06:10:12 GMT
  1209.  
  1210. Think-ers:
  1211.  
  1212. A while ago I posted a request for some pointers on developing
  1213. external code resources and then calling those resources from within
  1214. my main code.
  1215.  
  1216. I wanted to design modular external code like XCMD's and be able to
  1217. pass control to them.
  1218.  
  1219. As far as I can tell, Think-C will take exception to generating
  1220. external code resources of type 'CODE' and will precede your code with
  1221. segment loader information. (True?) Thus, my resources are not named
  1222. as 'CODE' to avoid this.
  1223.  
  1224. I need to give credit to Mark Fleming and Bob Murphy for shedding some
  1225. light on this problem. Thanks guys!
  1226.  
  1227. --douglas
  1228.  
  1229. _______________________________________________________________________________
  1230.  Douglas Yarrington                                 yarri@ee.eng.ohio-state.edu
  1231.  
  1232.  
  1233. /*
  1234. =========================================================================
  1235.  
  1236.         QDCodeTest.c
  1237.  
  1238.         Program to test access to external code segments which may require
  1239.         an access to QuickDraw globals.
  1240.  
  1241.         History:
  1242.                 12/14/91 DNY            Original.
  1243.  
  1244. =========================================================================
  1245. */
  1246.  
  1247. /*
  1248. ------------------------ External Code Generation -----------------------
  1249.  
  1250. Create a project with all the necessary libraries and the following
  1251. code:
  1252.  
  1253.         int main(int a)
  1254.         {
  1255.         int                     itemHit;
  1256.         DialogPtr       theD;
  1257.  
  1258.                 theD = GetNewDialog(100,0L,(WindowPtr) -1L);
  1259.                 do
  1260.                 {
  1261.                         ModalDialog(0L,&itemHit);
  1262.                 }
  1263.                 while ( itemHit != 1);
  1264.                 DisposeDialog(theD);
  1265.         }
  1266.  
  1267. We now want to make this code JSR-able. That is, we want to compile
  1268. the code, and store the resulting opcodes as a resource.
  1269.  
  1270. Set the project type to "Code Resource" and name/number it
  1271. appropriately.  Set the custom headers off; ie, don't add any jump
  1272. table information to the head of your code.
  1273.  
  1274. Note: ThinkC takes exception to resources of type 'CODE' and adds
  1275. segment loader jump table information to the begining of your code.
  1276. You'll then have to use the segment loader to access your code. So,
  1277. for this case, don't name your resource type 'CODE'
  1278.  
  1279. Build this code resource, and merge it with this project's resource
  1280. file so that the external resource can be accessed via GetResource.
  1281. -------------------------------------------------------------------------
  1282. */
  1283.  
  1284. typedef int (*xFncPtr) (int a);
  1285.  
  1286.  
  1287. main()
  1288. {
  1289. int a;
  1290. Handle  hCode;
  1291. xFncPtr xFP;
  1292.  
  1293.         /* System Setup */
  1294.         InitGraf(&thePort);
  1295.         InitFonts();
  1296.         InitWindows();
  1297.         InitMenus();
  1298.         TEInit();
  1299.         InitDialogs(0L);
  1300.         InitCursor();
  1301.  
  1302.         hCode = Get1NamedResource('XTRN', "\pQDTestCode");
  1303.         HLock(hCode);
  1304.         xFP = (xFncPtr)*hCode;
  1305.         Debugger();                     // You'll jump in just before the JSR
  1306.         a = (*xFP) (2);
  1307.         HUnlock(hCode);
  1308.  
  1309.         ExitToShell();
  1310. }
  1311.  
  1312. 
  1313. 
  1314. Path: ucivax!gateway
  1315. From: sears@netcom.com (Daniel Sears)
  1316. Subject: atof bug in Think C 4.0.5
  1317. Message-ID: <9112230658.AA02691@netcom.netcom.com>
  1318. Newsgroups: fa.think-c
  1319. Lines: 14
  1320. Date: 23 Dec 91 06:58:27 GMT
  1321.  
  1322. Imagine my surprise when Think C 4.0.5 compiled the following code
  1323.  
  1324.     #include <stdio.h>
  1325.     #include <stdlib.h>
  1326.  
  1327.     main()
  1328.     {
  1329.         printf("atof(0.070) %f\n", atof("0.070"));
  1330.     }
  1331.  
  1332. and printed "0.70".  Since I haven't upgraded to Think C 5.0.x, I'm
  1333. wondering if I can look forward to this bug.
  1334.  
  1335. --Dan
  1336. 
  1337. 
  1338. Path: ucivax!gateway
  1339. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  1340. Subject: atof bug in Think C 4.0.5
  1341. Message-ID: <9112231503.AA29375@chaos.cs.brandeis.edu>
  1342. In-Reply-To: Daniel Sears's message of 23 Dec 91 06:58:27 GMT <9112230658.AA02691@netcom.netcom.com>
  1343. Newsgroups: fa.think-c
  1344. Lines: 26
  1345. Date: 23 Dec 91 15:03:34 GMT
  1346.  
  1347. From: Daniel Sears <sears@netcom.com>
  1348.    Imagine my surprise when Think C 4.0.5 compiled the following code
  1349.  
  1350.        #include <stdio.h>
  1351.        #include <stdlib.h>
  1352.  
  1353.        main()
  1354.        {
  1355.            printf("atof(0.070) %f\n", atof("0.070"));
  1356.        }
  1357.  
  1358.    and printed "0.70".  Since I haven't upgraded to Think C 5.0.x, I'm
  1359.    wondering if I can look forward to this bug.
  1360.  
  1361. This bug is fixed in the C 4.0.5 release. Make sure that you've
  1362. installed the "scanf patch" file in your copy of THINK C, and that
  1363. you've recompiled the ANSI library that you're using. Once you've done
  1364. this, you should also be sure to reload the ANSI library into your
  1365. project (you can do this by using the Make dialog along with Use
  1366. Disk).
  1367.  
  1368.     -phil
  1369. ----
  1370.    Phil Shapiro                           Technical Support Analyst
  1371.    Language Products Group                     Symantec Corporation
  1372.         Internet: phils@chaos.cs.brandeis.edu
  1373. 
  1374. 
  1375. Path: ucivax!gateway
  1376. From: jmunkki@hila.hut.fi (Juri Munkki)
  1377. Subject: Bug in TCL 1.1.1?
  1378. Message-ID: <199112230059.AA18766@hila.hut.fi>
  1379. Newsgroups: fa.think-c
  1380. Lines: 13
  1381. Date: 23 Dec 91 22:04:04 GMT
  1382.  
  1383. I'm writing a class that overrides GetBalloonInfo (from CView) and I noticed
  1384. a bug in the function. A pointer to a pointer is passed as the tipProc
  1385. parameter, but the routine only sets tipProc to NULL. This doesn't set
  1386. the real tipProc variable to anything. Fortunately tipProc is initialized
  1387. in DispatchCursor, so nothing harmful really follows from this.
  1388.  
  1389. Can anyone verify this? I'm quite new to TCL, so there is the possibility that
  1390. I have misunderstood something.
  1391.  
  1392.    ____________________________________________________________________________
  1393.   / Juri Munkki        /  Helsinki University of Technology   /  Wind  / Project /
  1394.  / jmunkki@hut.fi  /  Computing Center Macintosh Support  /  Surf  /  #####  /
  1395.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1396. 
  1397. 
  1398. Path: ucivax!gateway
  1399. From: nagel@ics.uci.edu (Mark Nagel)
  1400. Subject: ARCHIVE: THINK Back 1.0 Extension
  1401. Message-ID: <13368.693763068@ics.uci.edu>
  1402. Newsgroups: fa.think-c
  1403. Reply-To: nagel@ics.uci.edu
  1404. Lines: 25
  1405. Date: 26 Dec 91 15:58:00 GMT
  1406.  
  1407. Date: Sat, 21 Dec 91 23:32:19 -0500
  1408. From: Phil Shapiro <phils@chaos.cs.brandeis.EDU>
  1409. Subject: THINK Back 1.0 Extension (requires System 7)
  1410.  
  1411. Hi,
  1412.  
  1413. Here's a short extension I wrote that lets you put THINK C compiles in
  1414. the background under System 7, using either C 4.0.5 or 5.0. It's well
  1415. enough tested to be a 1.0 version, but I'm sure that some bugs still
  1416. remain; please email any to me.
  1417.  
  1418. THINK Back 1.0 and a ReadMe file are in the Compact Pro archive
  1419. attached at the end of this note. In short, holding down the Shift key
  1420. when begining any source file compile will make that compile
  1421. backgroundable, and you can safely use your Mac for doing other
  1422. important things, like reading net-news.
  1423.  
  1424. Enjoy,
  1425.     -phil
  1426. ----
  1427.    Phil Shapiro                           Technical Support Analyst
  1428.    Language Products Group                     Symantec Corporation
  1429.         Internet: phils@chaos.cs.brandeis.edu
  1430.  
  1431. [saved as: /mac/think-c/symantec/think-back.hqx; 12K]
  1432. 
  1433. 
  1434. Path: ucivax!gateway
  1435. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  1436. Subject: Bug in TCL 1.1.1?
  1437. Message-ID: <9112271741.AA23853@chaos.cs.brandeis.edu>
  1438. In-Reply-To: Juri Munkki's message of 23 Dec 91 22:04:04 GMT <199112230059.AA18766@hila.hut.fi>
  1439. Newsgroups: fa.think-c
  1440. Lines: 16
  1441. Date: 27 Dec 91 17:41:01 GMT
  1442.  
  1443. From: Juri Munkki <jmunkki@hila.hut.fi>
  1444.    I'm writing a class that overrides GetBalloonInfo (from CView) and
  1445.    I noticed a bug in the function. A pointer to a pointer is passed
  1446.    as the tipProc parameter, but the routine only sets tipProc to
  1447.    NULL. This doesn't set the real tipProc variable to anything.
  1448.    Fortunately tipProc is initialized in DispatchCursor, so nothing
  1449.    harmful really follows from this.
  1450.  
  1451. This is most definitely a bug. Luckily, it's a pretty harmless one. It
  1452. should be fixed in the next patch for THINK C.
  1453.  
  1454.     -phil
  1455. ----
  1456.    Phil Shapiro                           Technical Support Analyst
  1457.    Language Products Group                     Symantec Corporation
  1458.         Internet: phils@chaos.cs.brandeis.edu
  1459. 
  1460. 
  1461. Path: ucivax!gateway
  1462. From: markets!bob@uunet.uu.net (Bob Schumaker -- "Software-in-a-bucket")
  1463. Subject: Re: Compiler bug in THINK C 5.01??
  1464. Message-ID: <9112282149.AA07588@grand-central>
  1465. Newsgroups: fa.think-c
  1466. Lines: 4
  1467. Date: 28 Dec 91 23:52:08 GMT
  1468.  
  1469. Whoops!  It turns out that Packages.h was not included (it seems to not
  1470. be in MacHeaders.h) and the lack of prototype for IUCompString was at fault.
  1471.  
  1472. Sorry 'bout that :-)
  1473. 
  1474. 
  1475. Path: ucivax!gateway
  1476. From: markets!bob@uunet.uu.net (Bob Schumaker -- "Software-in-a-bucket")
  1477. Subject: Compiler bug in THINK C 5.01??
  1478. Message-ID: <9112280250.AA29121@grand-central>
  1479. Newsgroups: fa.think-c
  1480. Lines: 90
  1481. Date: 28 Dec 91 23:52:19 GMT
  1482.  
  1483. I have a routine for checking font menu items (used by some support code
  1484. for TransSkel 2.9T--coming soon (TransSkel with many enhancements including
  1485. automatic edit/font/style management and floating windows) (plug, plug))
  1486. that works fine under MPW 3.x but fails under THINK C 5.0.1
  1487.  
  1488. After looking at the code from both version of the compiler, I think that
  1489. I have found the problem.  Notice in the code below, after CheckItem returns,
  1490. there is an "ADDQ.L #4,A7".  While stepping through the code with The
  1491. Debugger (Jasik's), I watched A7, and sure enough, this line moves A7 in
  1492. the *wrong* direction, a SUBQ.L #4,A7 (or whatever, I don't have my 680x0
  1493. manual handy) would have restored the SP to the "correct" value.
  1494.  
  1495. I've checked the headers, the procedure is declared (in Menus.h) and
  1496. the parameter passing code parallels the MPW code.  This is the only
  1497. substantive difference and debugging show this line to be the incorrect one.
  1498.  
  1499. So, am I doing something wrong, or is this a bug?
  1500.  
  1501. ------------------------------------------------------------------------
  1502. 9B0:                                 QUAL    proc597 ; b# =666  s#3  =proc597
  1503.  
  1504.                                  vvh_1     VEQU  -512
  1505.                                  vvh_2     VEQU  -256
  1506.                                  param1    VEQU  8
  1507. 9B0:                                 VEND
  1508.  
  1509.                                  ;-refs -  3/SkelExplicitUpdateMenus
  1510.  
  1511. ;#
  1512. ;#  /*
  1513. ;#    Handle font and style menus
  1514. ;#  */
  1515. ;#  enum {  s9 = 1, s10, s12, s14, s18, s24, s36, s48, sOther, sDud1,
  1516. ;#      sPlain, sBold, sItalic, sUnder, sDud2,
  1517. ;#      sLeft, sCenter, sRight };
  1518. ;#  static short sizes[] = {9, 10, 12, 14, 18, 24, 36, 48 };
  1519. ;#
  1520. ;#    static void
  1521. ;#  CheckThisFont (short fNum)
  1522. ;#  {
  1523. ;#    Str255 fontname, buf;
  1524. ;#    int i, n;
  1525. ;#    short cmp;
  1526. ;#
  1527. 9B0: 4E56 FE00      'NV..'  proc597  LINK    A6,#-$200
  1528. 9B4: 48E7 0700      'H...'           MOVEM.L D5-D7,-(A7)
  1529. ;#    GetFontName (fNum, &fontname);
  1530. 9B8: 3F2E 0008      2000008          PUSH    param1(A6)
  1531. 9BC: 486E FF00      200FF00          PEA     vvh_2(A6)
  1532. 9C0: A8FF           '..'             _GetFName ; (familyID:INTEGER; VAR theName:Str255)
  1533. ;#    n = CountMItems (fontMenu);
  1534. 9C2: 4267           'Bg'             CLR     -(A7)
  1535. 9C4: 2F2D 0014      '/-..'           PUSH.L  (A5)
  1536. 9C8: A950           '.P'             _CountMItems ; (menu:MenuHandle):INTEGER
  1537. 9CA: 3C1F           '<.'             POP     D6
  1538. ;#    for (i=1;i<=n;++i) {
  1539. 9CC: 7E01           '~.'             MOVEQ   #1,D7
  1540. 9CE: 602E           30009FE          BRA.S   lvh_2
  1541. ;#      GetItem (fontMenu, i, &buf);
  1542. 9D0: 2F2D 0014      '/-..'  lvh_1    PUSH.L  (A5)
  1543. 9D4: 3F07           '?.'             PUSH    D7
  1544. 9D6: 486E FE00      200FE00          PEA     vvh_1(A6)
  1545. 9DA: A946           '.F'             _GetItem ; (menu:MenuHandle; item:INTEGER; VAR itemString:Str255)
  1546. ;#      cmp = IUCompString (fontname, buf);
  1547. 9DC: 486E FE00      200FE00          PEA     vvh_1(A6)
  1548. 9E0: 486E FF00      200FF00          PEA     vvh_2(A6)
  1549. 9E4: 4EAD 0000      'N...'           JSR     (A5)
  1550. 9E8: 3A00           ':.'             MOVE    D0,D5
  1551. ;#      (void) CheckItem (fontMenu, i, (Boolean)(cmp == 0));
  1552. 9EA: 2EAD 0014      '....'           MOVE.L  (A5),(A7)
  1553. 9EE: 3F07           '?.'             PUSH    D7
  1554. 9F0: 4A45           'JE'             TST     D5
  1555. 9F2: 57C0           'W.'             SEQ     D0
  1556. 9F4: 4400           'D.'             NEG.B   D0
  1557. 9F6: 1F00           '..'             PUSH.B  D0
  1558. 9F8: A945           '.E'             _CheckItem ; (menu:MenuHandle; item:INTEGER; checked:BOOLEAN)
  1559.  
  1560. The line that appears to be in error
  1561. *****************
  1562. 9FA: 588F           'X.'             ADDQ.L  #4,A7
  1563. ****************
  1564.  
  1565. 9FC: 5247           'RG'             ADDQ    #1,D7
  1566. 9FE: BC47           '.G'    lvh_2    CMP.W   D7,D6
  1567. A00: 6CCE           30009D0          BGE     lvh_1
  1568. ;#    }
  1569. ;#  }
  1570. A02: 4CDF 00E0      'L...'           MOVEM.L (A7)+,D5-D7
  1571. A06: 4E5E           'N^'             UNLK    A6
  1572. A08: 4E75           'Nu'             RTS
  1573. 
  1574. 
  1575. Path: ucivax!gateway
  1576. From: halam1@ub.d.umn.edu ("Haseen I. Alam")
  1577. Subject: some simple questions
  1578. Message-ID: <9112301936.AA18391@ub.d.umn.edu>
  1579. X-Mailer: ELM [version 2.3 PL11]
  1580. Newsgroups: fa.think-c
  1581. Lines: 61
  1582. Date: 30 Dec 91 20:32:48 GMT
  1583.  
  1584.  
  1585.  Hi there,
  1586.  
  1587.     I am reading the "Mac Programming Primer vol. 1" by Mark & Reed and was
  1588.     tempted to try out the sample code for a Timer which includes menus and
  1589.     some event handling.  I typed in the code and included MacTraps.  There
  1590.     are no typos that I made but I get some errors.  Tried the debugger and
  1591.     the problem seems to be in a call to "IUTimeString".  There was another
  1592.     posting that I read about "IUCompString" giving some problems because
  1593.     Packages.h was not included.  I would try that and see if that helps.
  1594.     But other suggestions are well come.  BTW I am using ThinkC 5.0.1 on a
  1595.     Mac IIci 20MB RAM and 80MB HD with the cache card.  Here are some of the
  1596.     problems that I am facing.
  1597.  
  1598.     1) In all the source code MOVE_TO_FRONT is defines to be -1L, but the
  1599.     compiler does says that it does not match prototype for GetNewWindow.
  1600.     So I passed in 0L instead, and used ShowWindow to make the window the
  1601.     front most one.  This seems to work.  But what should be the proper value
  1602.     to make it the new window the front most when calling GetNewWindow?
  1603.  
  1604.     2) I used ResEdit 2.1 to create my resource files.  The interface is
  1605.     quite a bit different from the old one as shown on the book.  Anyway I
  1606.     think I created them fine, the menus come up and the hierarchical menus
  1607.     show the little delta |> but nothing on them.  It is supposed to show a
  1608.     font and style menu.  In ResEdit I can open up the MENU resource for the
  1609.     Special menu and double click on the Font/Style sub-menu and it opens up
  1610.     the proper menu resource for them.
  1611.  
  1612.     3) One thing the book does not explain kind of left me wondering... here
  1613.     is the code for MenuBarInit.  Why do they use GetMHandle for the Apple
  1614.     menu and GetMenu for the Font and Style menus?
  1615.  
  1616. MenuBarInit ()
  1617. {
  1618.     Handle myMenuBar ;
  1619.  
  1620.     myMenuBar = GetNewMBar (BASE_RES_ID) ;
  1621.     SetMenuBar (myMenuBar) ;
  1622.     gAppleMenu = GetMHandle (APPLE_MENU_ID) ;
  1623.     gFontMenu = GetMenu (FONT_MENU_ID) ;
  1624.     gStyleMenu = GetMenu (STYLE_MENU_ID) ;
  1625.  
  1626.     InsertMenu (gFontMenu, NOT_A_NORMAL_MENU) ;
  1627.     AddResMenu (gFontMenu, 'FONT') ;
  1628.     InsertMenu (gStyleMenu, NOT_A_NORMAL_MENU) ;
  1629.  
  1630.     CheckItem (gStyleMenu, PLAIN_ITEM, TRUE) ;
  1631.     AddResMenu (gAppleMenu, 'DRVR') ;
  1632.     DrawMenuBar () ;
  1633.  
  1634.     gLastFont = 1 ;
  1635.     HandleFontChoice (gLastFont) ;
  1636. }
  1637.  
  1638.     Any helpful gesture will be highly appreciated.  Thanks.
  1639.  
  1640.  Haseen.
  1641.  .-------------------------------------------------------------------------.
  1642.  | "If you think I am expensive, wait  | email: halam1@ub.d.umn.edu        |
  1643.  |     till you hire an amateur!"      |    or  st0404@AppleLink.Apple.Com |
  1644.  `-------------------------------------------------------------------------'
  1645. 
  1646. 
  1647. Path: ucivax!gateway
  1648. From: amyb@cats.ucsc.edu
  1649. Subject: please remove amyb@cat from this list
  1650. Message-ID: <9112302237.AA14673@am.ucsc.edu>
  1651. Newsgroups: fa.think-c
  1652. Lines: 3
  1653. Date: 30 Dec 91 22:38:27 GMT
  1654.  
  1655. and place jillcoy@ucscb.ucsc.edu on
  1656.  
  1657. thank you!
  1658. 
  1659. 
  1660. Path: ucivax!gateway
  1661. From: rush@mnementh.metaphor.com (Ed Rush)
  1662. Subject: Mac Programming Primer
  1663. Message-ID: <9112302313.AA01595@mnementh.Metaphor.COM>
  1664. Newsgroups: fa.think-c
  1665. Lines: 22
  1666. Date: 30 Dec 91 23:13:31 GMT
  1667.  
  1668. -----------
  1669. > From: "Haseen I. Alam" <halam1@ub.d.umn.edu>
  1670. > Subject: Re:  some simple questions
  1671. >  I am reading the "Mac Programming Primer vol. 1" ...
  1672.  
  1673. I only wish I had a copy. Symantec sent me two copies of Vol. II.
  1674. Anyone have a Vol. I (not necessarily in new condition) to swap
  1675. for one my my Vol. IIs?
  1676.  
  1677. The nice lady at Symantec Customer Support told me that they
  1678. don't have any more Vol. I copies, but that some people have gotten
  1679. as many as three of Vol. II -- apparently, Symantec had to back-
  1680. order them, and some confusion ensued, so they wanted to make
  1681. *certain* that everyone who ordered it got it.  Rather nice of
  1682. them, I think, but I'd still like to have Vol. I.
  1683.  
  1684.   -----------------------------------------
  1685.   Ed Rush, employed by but not speaking for
  1686.   Metaphor Computers, Mtn. View, CA
  1687.      UUCP: [...!{apple|decwrl}!]metaphor!mnementh!rush
  1688.      Internet: rush@mnementh.metaphor.com
  1689.   -----------------------------------------
  1690. 
  1691.